<?php
include $this->Render('header.php');
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_STYLE;?>/css/admin.css" />
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
    $('.J-daish-video').on('click','.J-video-obj',function(){
		var url = $(this).data('url');
		playVideo(url);
	});
});
//视频弹出窗口
function playVideo(url){
	var html = '<div style="text-align:center;">';
		html +='<video width="400" height="300" controls autoplay>';
		html +='  <source src="'+url+'" type="video/mp4">';
		html +='  <object data="'+url+'" width="400" height="300"></object>';
		html +='</video></div>';
		
	var win = new Ext.Window({
			title:'视频',
			closeable:true,
			closeAction:'hide',
			modal:true,
			width:500,
			height:420,
			resizable:false,
			plain:true,
			layout:'fit',
			html:html
		});
		
	win.show(this);
}
</script>
<style type="text/css">
.tongrong-box ul li {float:left; margin-right:10px; margin-bottom:10px;}
</style>
<div class="tongrong-box J-daish-video" style="width:600px;overflow-y:scroll;overflow-x:hide;height:100%">
<fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
 <legend style="padding:5px 15px;"><h2>审核通过后的结果<input type="button" id="bn1" value="收起"/></h2></legend>
	<ul id="all" >
    	<?php
        	if(!empty($this->data['up_info']['now_val'])) foreach($this->data['up_info']['now_val'] as $key => $val){
				if(!empty($val)){
		?>
        		<?php
                	if($this->data['up_info']['next'] == 'oa_video'){
				?>
                <li class="J-video-obj" data-url="<?php echo $val;?>"><img src="<?php echo BASE_STYLE;?>/images/member/default_sildeshow.gif" width="84px" height="84px" /></li>
                <?php
					}else{
				?>
                <li>
                    <a href="<?php echo $val;?>" data-lightbox="pic">
                        <img class="example-image" src="<?php echo $val;?>" width="84px" height="84px" />
                    </a>
                </li>
                <?php
					}
				?>
        <?php
				}
			}
		?>
    </ul>
    </fieldset>
  <fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
 <legend style="padding:5px 15px;"><h2>删除的资料<input type="button" id="bn2" value="收起"/></h2></legend>
 	<ul id="remove">
    	<?php
        	if(!empty($this->data['remove_img'])) foreach($this->data['remove_img'] as $key => $val){
				if(!empty($val)){
		?>
        		<?php
                	if($this->data['up_info']['next'] == 'oa_video'){
				?>
                <li class="J-video-obj" data-url="<?php echo $val;?>"><img src="<?php echo BASE_STYLE;?>/images/member/default_sildeshow.gif" width="84px" height="84px" /></li>
                <?php
					}else{
				?>
                <li>
                    <a href="<?php echo $val;?>" data-lightbox="pic">
                        <img class="example-image" src="<?php echo $val;?>" width="84px" height="84px" />
                    </a>
                </li>
                <?php
					}
				?>
        <?php
				}
			}
		?>
    </ul>
    </fieldset>
      <fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
    <legend style="padding:5px 15px;"><h2>新增的资料<input type="button" id="bn3" value="收起"/></h2></legend>
 	<ul id="new">
    	<?php
        	if(!empty($this->data['new_img'])) foreach($this->data['new_img'] as $key => $val){
				if(!empty($val)){
		?>
        		<?php
                	if($this->data['up_info']['next'] == 'oa_video'){
				?>
                <li class="J-video-obj" data-url="<?php echo $val;?>"><img src="<?php echo BASE_STYLE;?>/images/member/default_sildeshow.gif" width="84px" height="84px" /></li>
                <?php
					}else{
				?>
                <li>
                    <a href="<?php echo $val;?>" data-lightbox="pic">
                        <img class="example-image" src="<?php echo $val;?>" width="84px" height="84px" />
                    </a>
                </li>
                <?php
					}
				?>
        <?php
				}
			}
		?>
    </ul>
    </fieldset>
</div>
<script>
	$("#all").toggle();
	$("#bn1").click(function(){
    $("#all").toggle();
});
	$("#bn2").click(function(){
    $("#remove").toggle();
});
	$("#bn3").click(function(){
    $("#new").toggle();
});
</script>
<?php include $this->Render('footer.php'); ?>